package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CMainMapper;
import com.ruoyi.system.domain.CMain;
import com.ruoyi.system.service.ICMainService;

/**
 * 采购Service业务层处理
 * 
 * @author GGJ
 * @date 2024-05-13
 */
@Service
public class CMainServiceImpl implements ICMainService 
{
    @Autowired
    private CMainMapper cMainMapper;

    /**
     * 查询采购
     * 
     * @param id 采购主键
     * @return 采购
     */
    @Override
    public CMain selectCMainById(Long id)
    {
        return cMainMapper.selectCMainById(id);
    }

    /**
     * 查询采购列表
     * 
     * @param cMain 采购
     * @return 采购
     */
    @Override
    public List<CMain> selectCMainList(CMain cMain)
    {
        return cMainMapper.selectCMainList(cMain);
    }

    /**
     * 新增采购
     * 
     * @param cMain 采购
     * @return 结果
     */
    @Override
    public int insertCMain(CMain cMain)
    {
        return cMainMapper.insertCMain(cMain);
    }

    /**
     * 修改采购
     * 
     * @param cMain 采购
     * @return 结果
     */
    @Override
    public int updateCMain(CMain cMain)
    {
        return cMainMapper.updateCMain(cMain);
    }

    /**
     * 批量删除采购
     * 
     * @param ids 需要删除的采购主键
     * @return 结果
     */
    @Override
    public int deleteCMainByIds(Long[] ids)
    {
        return cMainMapper.deleteCMainByIds(ids);
    }

    /**
     * 删除采购信息
     * 
     * @param id 采购主键
     * @return 结果
     */
    @Override
    public int deleteCMainById(Long id)
    {
        return cMainMapper.deleteCMainById(id);
    }
}
